import Vue from 'vue'
import Router from 'vue-router'
import CardManagement from '@/components/CardManagement'
import StoreVoucher from '@/pages/StoreVoucher/StoreVoucher'
import StoreInfo from '@/pages/storeInfo/StoreInfo'
import BranchManagement from '@/components/BranchManagement'
import Login from '@/pages/auth/Login'
import FoogetPassword from '@/pages/auth/FoogetPassword'
import StoreRegister from '@/pages/auth/StoreRegister'
import WeinXinLogin from '@/pages/WeinXinLogin'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'login',
      meta: {
        public: true
      },
      component: Login
    },
    {
      path: '/fogetpassword',
      name: 'foogetPassword',
      meta: {
        public: true
      },
      component: FoogetPassword
    },
    {
      path: '/weinxinlogin',
      name: 'weinxinlogin',
      meta: {
        public: true
      },
      component: WeinXinLogin
    },
    {
      path: '/fogetpassword',
      name: 'foogetPassword',
      meta: {
        public: true
      },
      component: FoogetPassword
    },
    {
      path: '/register',
      name: 'register',
      meta: {
        public: true
      },
      component: StoreRegister
    },
    {
      path: '/storeVoucher',
      name: 'storeVoucher',
      component: StoreVoucher
    },
    {
      path: '/cardmanagement',
      name: 'cardManagement',
      component: CardManagement
    },
    {
      path: '/storeInfo',
      name: 'StoreInfo',
      component: StoreInfo
    },
    {
      path: '/cardManagement',
      name: 'CardManagement',
      component: CardManagement
    },
    {
      path: '/branchmanagement',
      name: 'branchmanagement',
      component: BranchManagement
    },
    {
      path: '/',
      redirect: '/login'
    }
  ]
})
